#pragma once

#include <functional>

class Station;

class Scheduler
{
public:
	Scheduler(double timeUnit, map<string, Station*>* stations);
	~Scheduler(void);
	void run();
	void stop();
	void addTrigger(double,Station*);
private:
	bool running;
	double timeUnit;
	double time;
	map<string, Station*>* stations;
	priority_queue<pair<double, Station*>, vector<pair<double, Station*>>, greater<pair<double, Station*>>>* triggers;
	void init();
};

